﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 练习2
{
    class Program
    {
        static void Main(string[] args)
        {
            //练习2：输出成绩等级
            Console.Write("请输入0-100的分数");
            double Input = Convert.ToDouble(Console.ReadLine());
            int i = (int)Input / 10;
            if (Input < 0 || Input > 100)
            {
                Console.WriteLine("请输入0-100的数字");
            }
            else
            {
                switch (i)
                {
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                    case 5:
                        Console.WriteLine("您的成绩为不及格");
                        break;
                    case 6:
                    case 7:
                        Console.WriteLine("您的成绩为及格");
                        break;
                    case 8:
                        Console.WriteLine("您的成绩为良好");
                        break;
                    case 9:
                    case 10:
                        Console.WriteLine("您的成绩为优秀");
                        break;
                }
                Console.ReadKey();
            }
        }

    }
}
